global input "Q:\dc1prhcmsas01\PU2\data - sas"
global temp "Q:\dc1prhcmsas01\PU2\temp_stata_wr"
global log "Q:\dc1prhcmsas01\PU2\Log - Stata WR"
global output "Q:\dc1prhcmsas01\PU2\data_stata_wr"
global graphs "Q:\dc1prhcmsas01\PU2\graphs_stata_wr"
global tables "Q:\dc1prhcmsas01\PU2\tables_stata_wr"

cd "Q:\dc1prhcmsas01\PU2\Code - Stata WR"

capture log close
log using "$log/6_fig_distribution_change", replace

set scheme plotplain
graph set window fontface "Times New Roman"

*Dec 2016 to Dec 2017
use yr_month client_id state emp_pur_c salaried base if (yr_month==mdy(12,01,2016) | yr_month==mdy(12,01,2017)) using "$output\stayers_panel_treat.dta", clear
gen time=yr_month==mdy(12,01,2017)
drop yr_month 
reshape wide base salaried, i(state client_id emp_pur_c) j(time)

keep if salaried0==1 
keep if base0>=913 & base0<953
gen diff_base=100*(base1-base0)/base0

histogram diff_base if abs(diff_base)<=50, width(1) percent xtitle("Change in Base Pay (%)") ytitle("Share of Workers") xlabel(-40(20)40)
graph export "$graphs/fig4_distribution_change.eps", replace
graph export "$graphs/fig4_distribution_change.jpg", replace


log close